<template>
	<view> <!-- 积分兑换模板 -->
		<view class="module-component">
			<view class="productListModule">
				<view class="count_left">
					<text class="title">积分商城</text>
					<text class="right" @click="onJump">更多<text class="yticon icon-you"></text></text>
				</view>
				<Product1 :class="{'none':Productid!=0}" 
				:product="product" 
				:cartId='cartId' 
				:integralId='integralId'
				></Product1>
				<Product3 :class="{'none':Productid!=2}"
				:product="product" 
				:cartId='cartId' 
				:integralId='integralId'
				:bool="false"
				></Product3>
				<Product4 :class="{'none':Productid!=3}"
				:product="product" 
				:cartId='cartId' 
				:integralId='integralId'
				></Product4>
			</view>
		</view>
	</view>
</template>

<script>
	import Product1 from '@/components/product/product1.vue';
	import Product3 from '@/components/product/product3.vue'; 
	import Product4 from '@/components/product/product4.vue'; 
	
	import {mapMutations} from 'vuex';
	export default {
		components: {
			Product1,
			Product3,
			Product4,
		},
		name: 'integral-mall',
		props:{
			//调用产品模板id
			Productid:{
				type: Number,
				default: 0
			},
			//产品列表
			product:{
				type: Array,
				default: ()=>[]
			},
			//调用按钮模板id
			cartId: {
				type: Number,
				default: 1,
			}
		},
		data() {
			return {
				integralId: 1,
			};
		},
		methods:{
			// ...mapMutations(['shoppCart']),
			onJump(){
				this.$emit('eventClick');
			},
		}
	}
</script>

<style lang="scss">
	.module-component{
		position: relative;
		width: 100%;
		display: block;
		background: #fff;
		margin-top: 20upx;
		
		.count_left {
		    height: 90upx;
		    line-height: 90upx;
		    padding: 0 30upx;
		    display: flex;
		    justify-content: space-between;
			text-align: center;
			font-size: 14px;
			border-bottom: 2upx solid #eeeef3;
			.title{
				
			}
			.right{
				
			}
		}
	}
</style>
